<?php
	include 'BobDatabase.php';
	include 'database/Database.php';
	
	function navigationRestaurant($selSubj, $selPage)
	{
		$output  = "<p class=\"menuTitle\"> 식 당 이 름  </p>";
		$output .= "<ul class=\"subjects\">";
		
		$subject_set = getAllSubject();
//		while ($subject = mysql_fetch_array($subject_set))
//		{
//			$output .= "<li";
//			if ($subject["id"] == $selSubj['id'])
//			{
//				$output .= " class=\"selected\"";
//			}
//			$output .= "><a href=\"index.php?subj=" . urlencode($subject["id"]) . 
//				"\">{$subject["menu_name"]}</a></li>";
//			
//			$page_set = get_pages_for_subject($subject["id"]);
//			$page_count = mysql_num_rows($page_set);
//			if( $page_count <= 0 )
//				continue;
//			$output .= "<ul class=\"pages\">";
//			while ($page = mysql_fetch_array($page_set))
//			{
//				$output .= "<li";
//				if ($page["id"] == $selPage['id'])
//				{
//					$output .= " class=\"selected\"";
//				}
//				else 
//				{
//					$output .= " class=\"nonselected\"";
//				}
//				$output .= "><a href=\"index.php?page=" . urlencode($page["id"]) . 
//				"\">{$page["menu_name"]}</a></li>";
//			}
//			$output .= "</ul>";
//		}		
//		$output .= "</ul>";
//		return $output;
	}
	
	function getAllSubject()
	{
		$bobDB = GcBabDatabase::getInstance();
		$query = "SELECT * FROM subjects ORDER BY position ASC";
		$subject_set = $bobDB->query($query, $connection);		
		return $subject_set;
	}
?>